package com.suray.basic.wcs.plc.pojo.oper.lifter.message;

public enum LifterActionType {
    PAUSE(1, "暂停"),
    CONTINUE(2, "继续"),
    STOP(3, "急停"),
    CLEAR_TASK(4, "清除任务"),
    CLEAR_STOP(5, "急停复位"),
    ;

    int value;
    String des;
    LifterActionType(int value, String des) {
        this.value = value;
        this.des = des;
    }

    public static LifterActionType parseType(int value) {
        for (LifterActionType type : LifterActionType.values()) {
            if (type.value == value) {
                return type;
            }
        }

        throw new RuntimeException("提升机指令错误：" + value);
    }

    public int getValue() {
        return value;
    }

    @Override
    public String toString() {
        return des;
    }
}
